﻿
@model G28BS.Models.UserProfile

@{
    ViewBag.Title = "Síðan mín";
}

<div id="myProfile">
    <div id="playerName" >
        <h2>@Model.UserName</h2>
    </div>

    <div class="profileDivs">
        <h3>Recent Match History</h3>
        <!-- MatchHistoryPartial takes two argument inside a Dictionary object
            UserId and numberOfMatches to show.  If UserId is <= 0, all users are considered -->
        @Html.Partial("MatchHistoryPartial", new Dictionary<string,int>{{"userId", Model.UserId},{"numberOfMatches",10}})
        @section scripts{ <script type="text/javascript" src="~/Javascripts/MatchHistoryPartial.js"></script> }

        @Html.ActionLink("View match history", "CompleteMatchHistory", "Account", new { UserID = Model.UserId})
    </div>

    <div class="profileDivs">
        <h3>Ranking</h3>
        <!-- Todo: implement ranking -->
    </div>

    <div class="profileDivs" >
        <h3>User Info</h3>
        @Html.Partial("UserInfoPartial", Model)
    </div>
</div>



